using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class LearnAbstract : MonoBehaviour 
{
    // Start is called before the first frame update
    void Start()
    {
        myAbstract newName = new NewName();
        newName.GetName();
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}

public class NewName : myAbstract
{
    public override string MyName => "NewName";

    public override void SetName()
    {
   
    }

    public override void SetName(string name)
    {
  
    }
}

public abstract class myAbstract
{
    public string Name;
    public abstract string MyName { get; }

    public void GetName()
    {
        Debug.Log(MyName);
    }
    public abstract void SetName();

    public abstract void SetName(string name);

  //  public abstract event Action<> inname;

}
